//
//  NetCenter.h
//  lcs_c
//
//  Created by chaiyanan on 15/8/4.
//  Copyright (c) 2015年 jinxin. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Param.h"
#import "Parser.h"
#import "ParserResult.h"
#import "NetConst.h"

typedef void (^NetParserResult) (ParserResult *myResult);

@interface NetCenter : NSObject

+(void)getDataFromURL:(NSString *)url
               params:(Param *)params
               parser:(Parser *)parser
               result:(NetParserResult)result
              failure:(void (^)(NSError *error))failure;

+(void)postDataFromURL:(NSString *)url
                params:(Param *)params
                parser:(Parser *)parser
                result:(NetParserResult)result
               failure:(void (^)(NSError *error))failure;

+(void)postDataFromURL:(NSString *)url
                params:(Param *)params
                parser:(Parser *)parser
                result:(NetParserResult)result
               failure:(void (^)(NSError *error))failure
         progressBlock:(void(^)(float progress))progress;

@end
